<!--# layout("/common/layout.html",{"jsBase":"/js/cms/essentialInformation/"}){ -->

<form class="layui-form " id="updateForm">
    <fieldset class="layui-elem-field">
        <legend>基本信息</legend>
        <div class="layui-field-box">
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">姓名</label>
                        <div class="layui-input-inline">
                            <input type="text" id="name" name="name"  value="${essentialInformation.name}"  lay-verify="required" class="layui-input" >
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">性别</label>
                        <div class="layui-input-inline">
                            <layui:simpleDictSelect style='layui-input-inline' type="gender"
                                                    id="sex" name="sex" value="${essentialInformation.sex}" layVerify="required" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">出生日期</label>
                        <div class="layui-input-inline">
                            <input type="text" id="birthday" name="birthday"  value="${essentialInformation.birthday,"yyyy-MM-dd"}"  lay-verify="required" class="layui-input input-date" >
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">民族</label>
                        <div class="layui-input-inline">
                            <layui:simpleDictSelect style='layui-input-inline' type="nations"
                                                    id="nation" name="nation" value="${essentialInformation.nation}" layVerify="required" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">政治面貌</label>
                        <div class="layui-input-inline">
                            <layui:simpleDictSelect style='layui-input-inline' type="politicalOutlooks"
                                                    id="politicalOutlook" name="politicalOutlook" value="${essentialInformation.politicalOutlook}" layVerify="required" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">婚姻状况</label>
                        <div class="layui-input-inline">
                            <layui:simpleDictSelect style='layui-input-inline' type="maritalStatu"
                                                    id="maritalStatus" name="maritalStatus" value="${essentialInformation.maritalStatus}" layVerify="required" />
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">国籍</label>
                        <div class="layui-input-inline">
                            <input type="text" id="nativePlace" name="nativePlace"  value="${essentialInformation.nativePlace}"  lay-verify="required" class="layui-input" >
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">电子邮件</label>
                        <div class="layui-input-inline">
                            <input type="text" id="mailBox" name="mailBox"  value="${essentialInformation.mailBox}"   class="layui-input" >
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">联系电话</label>
                        <div class="layui-input-inline">
                            <input type="text" id="contactNumber" name="contactNumber"  value="${essentialInformation.contactNumber}"   class="layui-input" >
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">手机号码</label>
                        <div class="layui-input-inline">
                            <input type="text" id="phoneNumber" name="phoneNumber"  value="${essentialInformation.phoneNumber}"  lay-verify="required" class="layui-input" >
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">证件类别</label>
                        <div class="layui-input-inline">
                            <layui:simpleDictSelect style='layui-input-inline' type="idType"
                                                    id="idType" name="idType" value="${essentialInformation.idType}" layVerify="required" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">证件号码</label>
                        <div class="layui-input-inline">
                            <input type="text" id="identificationNumber" name="identificationNumber"  value="${essentialInformation.identificationNumber}"  lay-verify="required" class="layui-input input-readonly" >
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">开户银行<span style="color: red">*</span></label>
                        <div class="layui-input-inline">
                            <input style="width: 100px" name="bankTypeName" type="text" value="中国工商银行" class="layui-input" >
                        </div>
                        <div class="layui-input-inline">
                            <input  style="width:114px;position: absolute;right: 175px" type="text"  id="accountOpeningBank" name="accountOpeningBank"  value="${essentialInformation.accountOpeningBank}"  lay-verify="required" class="layui-input" >
                        </div>
                        <div class="layui-input-inline">
                            <input style="width: 40px;border:none;position: absolute;left: 20px " type="text" value="支行" class="layui-input"  readonly>
                        </div>
                    </div>

                </div>
            </div>

            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">银行卡号</label>
                        <div class="layui-input-inline">
                            <input type="text"  id="bankCardNumber" name="bankCardNumber"  value="${essentialInformation.bankCardNumber}"  lay-verify="required|number" class="layui-input" >
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </fieldset>

    <fieldset class="layui-elem-field">
        <legend>最高学历（学位）信息</legend>
        <div class="layui-field-box">
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">毕业院校</label>
                        <div class="layui-input-inline">
                            <input type="text" id="graduateSchool" name="graduateSchool"  value="${essentialInformation.graduateSchool}"  lay-verify="required" class="layui-input" >
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">专业</label>
                        <div class="layui-input-inline">
                            <input type="text" id="major" name="major"  value="${essentialInformation.major}"  lay-verify="required" class="layui-input" >
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">学历</label>
                        <div class="layui-input-inline">
                            <layui:simpleDictSelect style='layui-input-inline' type="educations"
                                                    id="education" name="education" value="${essentialInformation.education}" layVerify="required" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">学位</label>
                        <div class="layui-input-inline">
                            <layui:simpleDictSelect style='layui-input-inline' type="academicDegrees"
                                                    id="academicDegree" name="academicDegree" value="${essentialInformation.academicDegree}" layVerify="required" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </fieldset>

    <fieldset class="layui-elem-field">
        <legend>工作信息</legend>
        <div class="layui-field-box">
            <div class="layui-row">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">现工作企业</label>
                        <div class="layui-input-inline">
                            <input  type="text" id="currentWorkingEnterprise"  readonly="true" name="currentWorkingEnterprise"  value="${essentialInformation.currentWorkingEnterprise}"   class="layui-input input-readonly" >
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">职位</label>
                        <div class="layui-input-inline">
                            <input type="text" id="position" name="position"  value="${essentialInformation.position}"  lay-verify="required" class="layui-input" >
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </fieldset>


    <fieldset class="layui-elem-field">
        <legend>主要成就</legend>
        <div class="layui-field-box">
        <div class="layui-input-block">
            <textarea id="majorAchievements" name="majorAchievements"  class="layui-textarea">${essentialInformation.majorAchievements} </textarea>
        </div>
        </div>
    </fieldset>
    </div>

	<!-- 业务对象须有hidden字段，保存delFlag和version字段-->
    <input type="hidden" id="companyId" name="companyId"  value="${essentialInformation.companyId}"   class="layui-input" >
    <input type="hidden" id="userId" name="userId"  value="${essentialInformation.userId}"   class="layui-input" >

    <input type="hidden" name="delFlag" value=${essentialInformation.delFlag} />
    <input type="hidden" name="id" value=${essentialInformation.id} />
    <div class="layui-row" style="text-align: center;">
        <button class="layui-btn layui-btn-danger" type="button" lay-submit lay-filter="form">保存</button>
        <button class="layui-btn" type="button" onclick="exit()">取消</button>
    </div>
</form>
<!--#} -->
<script>
    var form;
    layui.use(['edit', 'form'], function(){
    var essentialInformationEdit = layui.edit
    essentialInformationEdit.init();
    form = layui.form;

    form.on('submit(form)', function(){
        var callback = function(){
            // parent.window.dataReload();
            Common.info("个人信息填写成功");
            Lib.closeFrame();
            window.parent.location.reload();
        };
        Lib.submitForm("/cms/essentialInformation/initEdit.json",$('#updateForm'),{},callback);
    });
});

function exit(){
    window.parent.location.href = '/logout.do';
}
</script>
